Skip to content

Fix Notion sync checkpoint handling - #684

Merged
iamakulov merged 1 commit into
mainfrom
codex/fix-notion-sync-checkpoint
Aug 18, 2026
Merged

Fix Notion sync checkpoint handling#684
iamakulov merged 1 commit into
mainfrom
codex/fix-notion-sync-checkpoint

Conversation

@iamakulov

@iamakulov iamakulov commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

This PR fixes a Notion sync bug where, when one or more items would fail to sync, we’d still treat the sync as successful and advance the checkpoint. The result of this would be that the failed items would stay outdated but would be treated as fresh (until you edit them again).

QAed by blocking one of the requests that the plugin makes to the Notion API to fetch a record.

Changelog

  • Fixed Notion sync so failed items are retried instead of being incorrectly marked as up to date.

@iamakulov
iamakulov marked this pull request as ready for review August 10, 2026 16:46
Copilot AI lite review requested due to automatic review settings August 10, 2026 16:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Notion sync checkpoint advancement so that collections don’t record a successful sync checkpoint when one or more items failed to import, preventing those failed items from being incorrectly treated as up-to-date.

Changes:

  • Capture a conservative syncStartedAt timestamp at the beginning of the sync to use as the next checkpoint on full success.
  • Only persist PLUGIN_KEYS.LAST_SYNCED when there are zero per-item sync errors; otherwise keep the previous checkpoint and surface a sync failure.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread plugins/notion/src/data.ts
@iamakulov
iamakulov force-pushed the codex/fix-notion-sync-checkpoint branch from c188722 to 578b26a Compare August 10, 2026 17:39
@iamakulov
iamakulov requested a review from kaloyanvi August 10, 2026 18:05

@kaloyanvi kaloyanvi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Left two nits

Comment thread plugins/notion/src/data.ts Outdated
Comment thread plugins/notion/src/data.ts Outdated
@iamakulov
iamakulov force-pushed the codex/fix-notion-sync-checkpoint branch 2 times, most recently from 82f8aa9 to 2eb945d Compare August 18, 2026 18:55
@iamakulov iamakulov added the Auto submit to Marketplace on merge Submits the plugin to the marketplace after merging label Aug 18, 2026
@iamakulov
iamakulov force-pushed the codex/fix-notion-sync-checkpoint branch from 2eb945d to 2108494 Compare August 18, 2026 19:16
@iamakulov
iamakulov enabled auto-merge August 18, 2026 19:24
@iamakulov
iamakulov added this pull request to the merge queue Aug 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 18, 2026
@iamakulov
iamakulov added this pull request to the merge queue Aug 18, 2026
Merged via the queue into main with commit 529970b Aug 18, 2026
9 checks passed
@iamakulov
iamakulov deleted the codex/fix-notion-sync-checkpoint branch August 18, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto submit to Marketplace on merge Submits the plugin to the marketplace after merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants